package com.vondear.rxui.view.dialog;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.vondear.rxui.R;

import androidx.recyclerview.widget.RecyclerView;


/**
 * @author vondear
 * @date 2016/7/19
 * Mainly used for confirmation and cancel.
 */
public class RxDialogSelectZhengJuType extends RxDialog {

    private ImageView mClose;
    private RecyclerView typeRec;

    public RxDialogSelectZhengJuType(Context context, int themeResId) {
        super(context, themeResId);
        initView();
    }

    public RxDialogSelectZhengJuType(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
        initView();
    }

    public RxDialogSelectZhengJuType(Context context) {
        super(context);
        initView();
    }

    public RxDialogSelectZhengJuType(Activity context) {
        super(context);
        initView();
    }

    public RxDialogSelectZhengJuType(Context context, float alpha, int gravity) {
        super(context, alpha, gravity);
        initView();
    }

    public RecyclerView getTypeRec(){
        return typeRec;
    }

    public void setCloseLinstener(View.OnClickListener linstener){
        mClose.setOnClickListener(linstener);
    }

    private void initView() {
        View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_zhengju_type, null);
        mClose = dialogView.findViewById(R.id.closeBtn);
        typeRec = dialogView.findViewById(R.id.typeRec);
        setContentView(dialogView);
    }
}
